package cn.getech.data.development.model.vo;

import cn.getech.data.development.entity.BdpRealTaskAlarmObject;
import cn.getech.data.development.entity.BdpRealTaskAlarmReceived;
import cn.getech.data.development.entity.ProcInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.List;

/**
 * <p>
 * 实时任务告警表
 * </p>
 *
 * @author hujz
 * @since 2021-04-08
 */
@Data
public class RealTaskAlarmVO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 告警名称
     */
    private String name;

    /**
     * 项目id
     */
    private Integer procId;
    private String procName;

    /**
     * 任务类型 1：FLINK API  2：FLINK SQL  3：FLINK SQL DAG  4：实时采集
     */
    private Integer taskType;
    private String taskTypeTatil;

    /**
     * 触发条件 0：失败
     */
    private Integer triggerCondition;
    private String triggerConditionTatil;

    /**
     * 免打扰时间，开始
     */
    private LocalTime noDisturbingStartTime;

    /**
     * 免打扰时间，结束
     */
    private LocalTime noDisturbingEntTime;

    /**
     * 告警方式，1：邮件，2：T信，3：电话，4：短信  已逗号隔开
     */
    private List<String> alarmModes;
    private String alarmModeTatil;

    /**
     * 接收人类型，1：部门，2：项目，3：个人，4：本人
     */
    private Integer receivedType;

    /**
     * 告警状态，1：启用，0：禁用
     */
    private Integer state;

    /**
     * 告警发送次数
     */
    private Integer sendCount;

    /**
     * 最后一次发送时间
     */
    private LocalDateTime lastSendTime;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 创建人
     */
    private Integer createPer;
    private String createPerName;
    /***
     * 接收人的名字 已逗号隔开
     */
    private String receivedNames;
    /***
     * 规则对象的名字 已逗号隔开
     */
    private String objectNames;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 更新人
     */
    private Integer updatePer;


    //需要的集合数据
    private List<ProcInfo> allProcInfoLists;
    private List<IdAndNameVO> allTaskTypeLists;
    private List<IdAndNameVO> allConditionLists;
    private List<IdAndNameVO> allAlarmModeLists;
    private List<IdAndNameVO> allReceivedTypeLists;

    private List<BdpRealTaskAlarmReceived> cheackReceivedLists;
    private List<BdpRealTaskAlarmObject> cheackObjectLists;

}
